package com.zj.study.repository;

import com.zj.study.pojo.entity.User;
import org.springframework.data.mongodb.repository.ReactiveMongoRepository;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import reactor.core.publisher.Mono;

/**
 * @author ZhaoJiu
 * @data: 2021/7/21
 * @desc:
 */
@EnableMongoRepositories
public interface UserRepository extends ReactiveMongoRepository<User,String> {
    /**
     * 根据名称查询
     * @param username 用户名称
     * @return 用户数据
     */
    Mono<User> findUserByUsername(String username);
}
